package org.deltaset.secured.clinic.menu;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.ManagedBean;
import javax.inject.Inject;
import org.deltaset.desktop.MenuGroup;
import org.deltaset.secured.domain.Owner;
import org.deltaset.secured.domain.Pet;
import org.deltaset.secured.domain.Vet;
import org.deltaset.secured.domain.Visit;
import org.deltaset.secured.menu.MenuRegistry;

/**
 *
 * @author dmakariev
 */
@ManagedBean
public class ClinicMenu {

    private final static String ENTITY_SRC = "/record/meta-entity.xhtml";
    private final MenuRegistry menuRegistry;

    @Inject
    public ClinicMenu(MenuRegistry menuRegistry) {
        this.menuRegistry = menuRegistry;
        this.menuRegistry.getTopMenu().get(0).getMenuGroups().addAll(initMiniHome());
    }
	
	private List<MenuGroup> initMiniHome() {
        final List<MenuGroup> menuGroups = new ArrayList<MenuGroup>();
        menuGroups.add(MenuRegistry.autoObjects("Clinic", "org.deltaset.secured.domain"));
//        menuGroups.add(new MenuGroup("Record").add(Person.class, ENTITY_SRC).
//                add(Animal.class, ENTITY_SRC));

        return menuGroups;
    }

   // private List<MenuGroup> initMiniHome() {
   //     final List<MenuGroup> menuGroups = new ArrayList<MenuGroup>();
   //     menuGroups.add(new MenuGroup("Clinic").add(Owner.class, ENTITY_SRC).
   //             add(Pet.class, ENTITY_SRC).
   //             add(Vet.class, ENTITY_SRC).
   //             add(Visit.class, ENTITY_SRC));

   //     return menuGroups;
    //}
}
